package com.jfm.jfmm.collector.entity.collect.result;

import com.jfm.jfmm.collector.entity.collect.Result;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author DYang
 * @since 2024-10-11 22:19
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class ICMPResult extends Result {

    /**
     * 目标地址
     */
    private String host;

    /**
     * 返回值 1: 成功 0: 失败
     */
    private int result;

    /**
     * 延迟(ms)
     */
    private long delay;

    public static ICMPResult build(){
        return new ICMPResult();
    }

    public ICMPResult host(String host){
        this.host = host;
        return this;
    }

    public ICMPResult result(int result){
        this.result = result;
        return this;
    }

    public ICMPResult delay(long delay){
        this.delay = delay;
        return this;
    }
}
